package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/7/28.8:28
 */
@Entity
@Table(name = "coupon_consume_detail")
public class CouponConsumeDetailEntity extends BaseEntity {
    private String couponNo;
    private String consumeNo;

    @Basic
    @Column(name = "coupon_no")
    public String getCouponNo() {
        return couponNo;
    }

    public void setCouponNo(String couponNo) {
        this.couponNo = couponNo;
    }

    @Basic
    @Column(name = "consume_no")
    public String getConsumeNo() {
        return consumeNo;
    }

    public void setConsumeNo(String consumeNo) {
        this.consumeNo = consumeNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CouponConsumeDetailEntity that = (CouponConsumeDetailEntity) o;

        if (couponNo != null ? !couponNo.equals(that.couponNo) : that.couponNo != null) return false;
        if (consumeNo != null ? !consumeNo.equals(that.consumeNo) : that.consumeNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = couponNo != null ? couponNo.hashCode() : 0;
        result = 31 * result + (consumeNo != null ? consumeNo.hashCode() : 0);
        return result;
    }
}
